<!DOCTYPE html>
<html>
<head>
<title>账户管理</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<#include "../../../include/resources.html">
<script type="text/javascript">
	var dataGrid;
	var winWidth =  700;
	var winHeight = 500;
	var addTitle = "添加接口";
	var addUrl =  "/modules/system/pay/payAddPage.html";
	var addWinParmeters = "'{0}','"+addTitle+"',"+winWidth+","+winHeight+",'"+addUrl+"'";
	var editTitle = "编辑接口";
	var editUrl =  "/modules/system/pay/payEditPage.html";
	var delUrl = "/modules/system/pay/payDelete.html";	

	$(function() {
		var editIndex = undefined;
		dataGrid = $('#dataGrid').datagrid({
			url : 'payList.html',
			fit : true,
			fitColumns : true,
			border : false,
			pagination : true,
			idField : 'id',
			pageSize : pageSize,
			pageNums :1,
			pageList : pageList,
			checkOnSelect : false,
			selectOnCheck : false,
			nowrap : false,
			singleSelect:true,
			columns : [ [ 			
			{ field: 'id', title: '编号', width: 50,sortable:true,fixed:true},
			{ field: 'name', title: '接口名称', width: 80},
			{ field: 'nid', title: '接口标识',width:80},
			{ field: 'merchantId', title: '商户号',width:100},
			{ field: 'rechargeFee', title: '充值费率', width: 80},
			
			{ field: 'sort', title: '排序', width: 50,sortable:true,fixed:true},
			{ field: 'enable', title: '是否启用间连', width:80,formatter:function(value,row,index){
				if(value==0){
					return "关闭";
				}else{
					return "开启";
				}
			}},
			{ field: 'enableDirect', title: '是否开启直连', width: 80,formatter:function(value,row,index){
				if(value==0){
					return "关闭";
				}else{
					return "开启";
				}
			}},
			
			 { field : 'showInfo',
                title : '其他信息',
                width :75,
                align:'center',
                fixed:true,
                formatter : function(value, row, index) {
					var content = '<a href="javascript:void(0);" class="j-showInfo">查看<i class="iconfont">&#xe639;</i></a>'
						+ '<div class="showInfoSingleDiv">'
						+ '<div class="showInfo">'
						+ '<em></em><h2>支付接口信息</h2>'
						+ '<ul>'
						+ '<li>'
                		+ '<span>商品key：</span>'
						+ row.goodsKey
						+ '</li>'
						+ '<li>'
                		+ '<span>请求地址：</span>'
						+ row.requestUrl
						+ '</li>'
						+ '<li>'
                		+ '<span>回调地址：</span>'
						+ row.returnUrl
						+ '</li>'
						+ '<li>'
                		+ '<span>接口转入账户：</span>'
						+ row.intoAccount
						+ '</li>'
						+ '<li>'
                		+ '<span>编码格式：</span>'
						+ row.chartset
						+ '</li>'
						+ '<li>'
                		+ '<span>加密方式：</span>'
						+ row.signType
						+ '</li>'
						+ '<li>'
                		+ '<span>支付方式：</span>'
						+ row.payStyle
						+ '</li>'
						+ '<li>'
                		+ '<span>卖家Email：</span>'
						+ row.sellerEmail
						+ '</li>'
						+ '<li>'
                		+ '<span>处理模式：</span>'
						+ row.transport
						+ '</li>'
						+ '<li>'
                		+ '<span>商品描述：</span>'
						+ row.orderDescription
						+ '</li>'
						+ '<li>'
                		+ '<span>网关url：</span>'
						+ row.gatewayUrl
						+ '</li>'
						+ '<li>'
                		+ '<span>订单查询url：</span>'
						+ row.orderInquireUrl
						+ '</li>'
						+ '<li>'
                		+ '<span>证书路径：</span>'
						+ row.certPosition
						+ '</li>'
						+ '<li>'
                		+ '<span>终端号：</span>'
						+ row.terminalId
						+ '</li>'
						+ '</ul></div></div>';
					return content;
				}
			},
			
			{field : 'action',title : '操作',width :75,fixed:true,align:'center',
				formatter : function(value, row, index) {
					var str = '';
					str += '<dl>';
					str += '<dt><a href="javascript:void(0);">详情</a><i class="iconfont">&#xe639;</i></dt>' ;
					str += '<dd>';
					str += '<a href="javascript:void(0);" onclick="$.fn.dataGridOptions.editFun('+row.id+',editTitle,winWidth,winHeight,editUrl);" title="'+editTitle+'">编辑</a>';
					str += '<a href="javascript:void(0);" onclick="$.fn.dataGridOptions.deleteFun('+row.id+',delUrl);">删除</a>';
					str += '</dd>'
					str +=  '</dl>'
					return str;
				}
			} 
			 ] ],
			toolbar : '#toolbar'
		});
	});

	
</script>
</head>
<body style="padding:0 20px;" >
	<div class="easyui-layout" data-options="fit : true,border : false">
		<div data-options="region:'north',border:false,collapsible:false" id="searchBox">
            <div class="sRight">
				<a onclick="$.fn.dataGridOptions.addFun(-1,addTitle,winWidth,winHeight,addUrl);" href="javascript:void(0);" class="addBtn"><i class="iconfont">&#xe629;</i>添加</a>	
            </div>
		</div>
		<div data-options="region:'center'" style="margin-top:30px;padding-bottom:30px;">
			<table id="dataGrid"></table>
		</div>
	</div>
</body>
</html>
